A teaching device constructs a virtual robot system constituted by a robot and a peripheral structure of the robot in a virtual space, generates an operation program of the robot and teaches the operation of the robot off-line. An error usually exists between a virtual robot system and a real robot system and, if an operation program of a robot generated by a teaching device is supplied to a real robot system, it is possible that an interference or the like occurs between the robot and the peripheral structure.
PTL 1 discloses a technique as a teaching device in consideration of the error described above. This technique is for avoiding an interference between a robot and a peripheral structure by detecting an error in disposed position between a structure of a real robot system and a virtual robot system by measuring the disposed position of the structure of the real robot system using a 2D visual sensor, a 3D visual sensor, a distance sensor, and the like, and shifting teaching point coordinates by the amount of the error.